using System.Windows;

namespace FluentSilverlight
{
    public static class ConversionExtension
    {
        public static Visibility ToVisibility(this bool subject)
        {
            return subject ? Visibility.Visible : Visibility.Collapsed;
        }

        public static bool ToBoolean(this Visibility subject)
        {
            return subject == Visibility.Visible;
        }
    }
}